﻿<UserControl x:Class="ViCode_LeVi.Controls.VMTabBalanceAndOthers_Investmentcalculation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls">
    <ScrollViewer>
        <StackPanel>
            <DockPanel>
                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top"  HorizontalAlignment="Right" >
                    <vmcontrol:VMTextBlockExt  Margin="2" TextPath="CurrencySymbol_UI" />
                    <vmcontrol:VMTextBox_Number  Margin="2" Text="{Binding CurrencySymbol}"/>
                    <Button Content="Print" Click="Button_Click"/>
                </StackPanel>
               
                <vmcontrol:VMTextBlock_Fincance_Title DockPanel.Dock="Top" TextPath="Step_BalanceAndOthers_InvestmentCalculation_Header" Margin="2"/>
                <!--vmcontrol:VMTextBlock Text="Cockpit BSC" Margin="10" FontWeight="Bold" FontSize="20"/>-->
            </DockPanel>
            <vmcontrol:VMTextBlock_Fincance_Space_Header/>
            <DockPanel>
                <StackPanel Orientation="Horizontal">
                    <vmcontrol:VMTextBlockExt TextPath="Group_Project" Margin="2"/>
                    <vmcontrol:VMTextBox Margin="2" Text="{Binding ProjectName}" MinWidth="200" />
                </StackPanel>
            </DockPanel>


            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <!--GOALS-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="6" TextPath="Group_Goals" />

                <vmcontrol:VMTextBlockExt Grid.Row="1" Grid.Column="1" Margin="2" TextPath="Group_Goals_DesiredRentability" />
                <vmcontrol:VMTextBox_Number  Grid.Row="1" Grid.Column="2" Margin="2" Text="{Binding DesiredRentability, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlockExt Grid.Row="1" Grid.Column="3" Margin="2" TextPath="Group_Goals_PercentSign" />

                <vmcontrol:VMTextBlockExt Grid.Row="2" Grid.Column="1" Margin="2" TextPath="Group_Goals_LifeTime" />
                <vmcontrol:VMTextBox_Number  Grid.Row="2" Grid.Column="2" Margin="2" Text="{Binding LifeTime, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlockExt Grid.Row="2" Grid.Column="3" Margin="2" TextPath="Group_Goals_Year" Grid.ColumnSpan="2" />


                <!--Investment-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader  Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="6"  TextPath="Group_Investment" />
                <vmcontrol:VMTextBlockExt Grid.Row="3" Grid.Column="2" Margin="2" TextAlignment="Right" TextPath="Group_Investment_MoneySign" />

                <vmcontrol:VMTextBlockExt Grid.Row="4" Grid.Column="1" Margin="2" TextPath="Group_Investment_InvestmentCosts" />
                <vmcontrol:VMTextBox_Number  Grid.Row="4" Grid.Column="2" Margin="2" Text="{Binding InvestmentCosts, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlock Grid.Row="4" Grid.Column="3" Margin="2" Text="+" />

                <vmcontrol:VMTextBlockExt Grid.Row="5" Grid.Column="1" Margin="2" TextPath="Group_Investment_AdditionalCosts" />
                <vmcontrol:VMTextBox_Number  Grid.Row="5" Grid.Column="2" Margin="2" Text="{Binding AdditionalCosts, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlock Grid.Row="5" Grid.Column="3" Margin="2" Text="+" />

                <vmcontrol:VMTextBlockExt Grid.Row="6" Grid.Column="1" Margin="2" TextPath="Group_Investment_GrossInvestment" FontWeight="Bold" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="6" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding GrossInvestment, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="7" Grid.Column="1" Margin="2" TextPath="Group_Investment_LiquidationValue" />
                <vmcontrol:VMTextBox_Number  Grid.Row="7" Grid.Column="2" Margin="2" Text="{Binding LiquidationValue, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlock Grid.Row="7" Grid.Column="3" Margin="2" Text="-" />

                <vmcontrol:VMTextBlockExt Grid.Row="8" Grid.Column="1" Margin="2" TextPath="Group_Investment_NetInvestment" FontWeight="Bold" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="8" Grid.Column="2" Margin="2"   FontWeight="Bold"  IsReadOnly="True"  Text="{Binding NetInvestment, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <!--Earning-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="6" TextPath="Group_Earning" />

                <vmcontrol:VMTextBlockExt Grid.Row="10" Grid.Column="1" Margin="2" TextPath="Group_Earning_EarningsPerYear" />
                <vmcontrol:VMTextBox_Number  Grid.Row="10" Grid.Column="2" Margin="2" Text="{Binding EarningsPerYear, UpdateSourceTrigger = PropertyChanged}"/>
              
                <vmcontrol:VMTextBlockExt Grid.Row="11" Grid.Column="1" Margin="2" TextPath="Group_Earning_TotalEarnings" FontWeight="Bold" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="11" Grid.Column="4" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding TotalEarnings, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <!--Fixed costs per year-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="6" TextPath="Group_FixedCostsPerYear" />
                <StackPanel  Grid.Row="13" Grid.Column="1"  Orientation="Horizontal" VerticalAlignment="Center">
                    <vmcontrol:VMTextBox_Number Margin="2" MinWidth="20" Text="{Binding InterestPercent, UpdateSourceTrigger = PropertyChanged}"/>
                    <vmcontrol:VMTextBlockExt Grid.Row="13" Grid.Column="1" Margin="2" TextPath="Group_FixedCostsPerYear_PercentInterest" />
                </StackPanel>
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="13" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding InterestMoney, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>
            
                <vmcontrol:VMTextBlockExt Grid.Row="14" Grid.Column="1" Margin="2" TextPath="Group_FixedCostsPerYear_Depreciation" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="14" Grid.Column="2" Margin="2"  FontWeight="Bold"  IsReadOnly="True"  Text="{Binding Depreciation, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="15" Grid.Column="1" Margin="2,2,2,0" TextPath="Group_FixedCostsPerYear_IndirectLaborCosts"  VerticalAlignment="Top" />
                <vmcontrol:VMTextBox_Number  Grid.Row="15" Grid.Column="2" Margin="2" Text="{Binding IndirectLaborCosts, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="16" Grid.Column="1" Margin="2" TextPath="Group_FixedCostsPerYear_OtherFixedCosts" />
                <vmcontrol:VMTextBox_Number  Grid.Row="16" Grid.Column="2" Margin="2" Text="{Binding OtherFixedCosts, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="17" Grid.Column="1" Margin="2" TextPath="Group_FixedCostsPerYear_Sum" FontWeight="Bold" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="17" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding FixedCostsSum, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <!--Variable costs per year-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="18" Grid.Column="0" Grid.ColumnSpan="6"  TextPath="Group_VariableCostsPerYear" />

                <vmcontrol:VMTextBlockExt Grid.Row="19" Grid.Column="1" Margin="2" TextPath="Group_VariableCostsPerYear_VariableWages" />
                <vmcontrol:VMTextBox_Number  Grid.Row="19" Grid.Column="2" Margin="2" Text="{Binding VariableWages, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="20" Grid.Column="1" Margin="2" TextPath="Group_VariableCostsPerYear_VariableMaterialCosts" />
                <vmcontrol:VMTextBox_Number  Grid.Row="20" Grid.Column="2" Margin="2" Text="{Binding VariableaterialCosts, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="21" Grid.Column="1" Margin="2,2,2,0" TextPath="Group_VariableCostsPerYear_OtherVariableCosts" VerticalAlignment="Top" />
                <vmcontrol:VMTextBox_Number  Grid.Row="21" Grid.Column="2" Margin="2" Text="{Binding OtherVariableCosts, UpdateSourceTrigger = PropertyChanged}"/>
           
                <vmcontrol:VMTextBlockExt Grid.Row="22" Grid.Column="1" Margin="2" TextPath="Group_VariableCostsPerYear_Sum" FontWeight="Bold" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="22" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding VariableCostsSum, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <!--Total cost-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="23" Grid.Column="0" Grid.ColumnSpan="2" TextPath="Group_TotalCosts"  />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="23" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding TotalCostSum1, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="23" Grid.Column="4" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding TotalCostSum2, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlockExt  Grid.Row="23" Grid.Column="5" Margin="2" FontWeight="Bold"  TextPath="Group_TotalCosts_PerYear_Sum"/>


                <!--Result-->
                <vmcontrol:VMTextBlockExt_Finance_Investment_GroupHeader Grid.Row="24" Grid.Column="0" Grid.ColumnSpan="2"  TextPath="Group_Result"  />

                <vmcontrol:VMTextBlockExt Grid.Row="25" Grid.Column="1" Margin="2" TextPath="Group_Result_ResultPerYear" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="25" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding ResultPerYear, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>

                <vmcontrol:VMTextBlockExt Grid.Row="26" Grid.Column="1" Margin="2" TextPath="Group_Result_ResultTotal" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="26" Grid.Column="4" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding ResultTotal, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>
                <vmcontrol:VMTextBlockExt  Grid.Row="26" Grid.Column="5" Margin="2" TextPath="Group_Result_ResultTotal_LiquidationValueConsidered"/>

                <vmcontrol:VMTextBlockExt Grid.Row="27" Grid.Column="1" Margin="2" TextPath="Group_Result_Rentability" />
                <vmcontrol:VMTextBox_Number_ReadOnly  Grid.Row="27" Grid.Column="2" Margin="2" FontWeight="Bold"  IsReadOnly="True"  Text="{Binding Rentability, Mode = OneWay, UpdateSourceTrigger = PropertyChanged}"/>
                
                
            </Grid>

       

        </StackPanel>
    </ScrollViewer>
</UserControl>
